include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR}/common)

find_package(Protobuf REQUIRED)
set(PROTO_FILES
    ${CMAKE_SOURCE_DIR}/common/fileevent.proto
)
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})

add_executable(ukui-index-framework-service
    connection.cpp connection.h
    indexframeworksessionservice.cpp indexframeworksessionservice.h
    sessionfileeventmonitor.h sessionfileeventmonitor.cpp
    main.cpp
    ${PROTO_SRCS} ${PROTO_HDRS}
)
target_link_libraries(ukui-index-framework-service PRIVATE
    Qt::Core
    Qt::DBus
    Qt::Network
    ${PROTOBUF_LIBRARIES}
)

install(TARGETS ukui-index-framework-service
    RUNTIME DESTINATION ${GNU_INSTALL_BINDIR}
)
